Various electronic devices, for example, cameras, mobile phones, and other multimedia devices are widely used for capturing image of a scene. Some electronic devices are capable of capturing stereoscopic images, and performing depth estimation of the scene using the stereoscopic images. Depth estimation is a process that determines distance to multiple objects present in a camera view and is performed using a variety of methods. Stereo correspondence is one such method that performs the depth estimation by matching pixels in the stereoscopic images to obtain a depth map. Normally, the method of stereo correspondence includes different steps to obtain the depth map. Examples of the steps include color segmentation, cost aggregation, disparity plane estimation, and plane fitting of the segments to disparity planes of the scene. However, errors in the color segmentation, under-segmentation, and over-segmentation lead to an inaccurate depth map. Moreover, some pixels cannot be matched due to occlusion between the stereoscopic images, due to which incorrect matches are represented by holes in the depth map.